import request from '@/utils/request'
export default{
    //根据条件分页查询
    getCrmBannerList(current,pagesize,bannerQueryJson) {
       return request({
         url: `/cmsservice/crm-banner/page/${current}/${pagesize}`,
         method: 'post',
         //teacherQuery条件对象，后端使用RequestBody获取数据
            //data表示把对象转换json进行传递到接口里面
         data: bannerQueryJson
       })
    },
    //根据ID删除首页轮播图
    removeCrmBannerById(id) {
      return request({
        url: `/cmsservice/crm-banner/${id}`,
        method: 'delete'
      })
   },
    //根据ID查询首页轮播图
    getCrmBannerInfo(id) {
      return request({
        url: `/cmsservice/crm-banner/${id}`,
        method: 'get'
      })
   },
    //保存轮播图
    saveCrmBanner(crmBanner) {
      return request({
        url: `/cmsservice/crm-banner/save`,
        method: 'post',
        data: crmBanner
      })
   },
   //修改轮播图
   updateCrmBanner(crmBanner) {
    return request({
      url: `/cmsservice/crm-banner/update`,
      method: 'put',
      data: crmBanner
    })
 }

}
